<include file="public/head" />
</head>
<body>
<div class="am-modal am-modal-alert" tabindex="-1" id="fq_alert">
  <div class="am-modal-dialog">
    <div class="am-modal-hd" id="fq_alert_title"></div>
    <div class="am-modal-bd" id="fq_alert_info">
    </div>
    <div class="am-modal-footer">
      <span class="am-modal-btn">确定</span>
    </div>
  </div>
</div>
<div class="am-modal am-modal-confirm" tabindex="-1" id="fq_confirm">
  <div class="am-modal-dialog">
    <div class="am-modal-hd" id="fq_confirm_title"></div>
    <div class="am-modal-bd" id="fq_confirm_info"></div>
    <div class="am-modal-footer">
      <span class="am-modal-btn" data-am-modal-confirm="">确定</span>
    </div>
  </div>
</div>
<link rel="stylesheet" type="text/css" href="__STATIC__/itaoke/mobile/css/personal.css">
<script>
$(function() {
	//点击id为clear_content按钮，重置文本框
	$('#clear_content').on('click', function() {
		$("#content").val("");
	});
	 //点击提交按钮
	$('#submit').on('click', function() {
  		//获取输入内容
		var content = $('#content').val();
		//判断输入的内容是否为空
		if(!content){
			$("#zds_alert_info").text("反馈内容不能为空！");
			$('#zds_alert').modal();
			return;
		}
		//判断输入的字符有没达到要求的10个字符
		if(content.length < 10){
			$("#zds_alert_info").text("亲，至少要说10个字啦！");
			$('#zds_alert').modal();
			return;
		}
		$('#zds_confirm_feedback').modal({
			relatedTarget: this,
			onConfirm: function(options) {
				var $link = $(this.relatedTarget);
				var post_url="{:U('User/msg')}";
				$.post(post_url,{content:content},function(obj){
				//	var obj = JSON.parse(result); 
					if(obj.status == 1){ 
						$("#confirm_info").text(obj.data.info);
						$('#my-confirm').modal({
							closeViaDimmer:false,
							relatedTarget: this,
							onConfirm: function(options) {
								window.location.reload();
							},
							onCancel: function() {}
						});
					}else{
						$("#zds_alert_info").text(obj.data.info);
						$('#zds_alert').modal();
					}
				});
			},
			onCancel: function() { }
		});
  });
});
</script>
<div class="am-modal am-modal-alert" tabindex="-1" id="zds_alert">
  <div class="am-modal-dialog">
    <div class="am-modal-hd"></div>
    <div class="am-modal-bd">
      <span id="zds_alert_info"><span>
    </span></span></div>
    <div class="am-modal-footer">
      <span class="am-modal-btn">好的</span>
    </div>
  </div>
</div>
<div class="am-modal am-modal-confirm" tabindex="-1" id="zds_confirm_feedback">
  <div class="am-modal-dialog">
    <div class="am-modal-hd"></div>
    <div class="am-modal-bd">确定提交反馈吗？</div>
    <div class="am-modal-footer">
    	<span class="am-modal-btn" data-am-modal-confirm="">确定</span>
        <span class="am-modal-btn" data-am-modal-cancel="">取消</span>
    </div>
  </div>
</div>
<div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm">
	<div class="am-modal-dialog">
		<div class="am-modal-bd">
			<span id="confirm_info"></span>
		</div>
		<div class="am-modal-footer">
			<span class="am-modal-btn" data-am-modal-confirm="">好的</span>
		</div>
	</div>
</div>

<header style="position:relative;z-index:999;background:#F54D23;">
    <a href="javascript:void(0);" onclick="back();" style="position:absolute;top:2px;color:#fff;width:45px;height:100%;padding-left:10px;font-size:25px;" class="am-inline-block am-text-middle am-icon-angle-left"><!-- <img src="/Public/assets/mobile/images/left.png" />--></a><div class="am-per-center am-text-center am-padding-vertical-sm" style="color:#fff;font-size:16px;">建议反馈</div>
</header>

<script>
    function back(){
       var last_page_url = (document.referrer);
       if(last_page_url){
          	window.history.back();
		}else{
			window.location.href ="{:U('User/index')}";
		}
    }
</script>
<style type="text/css">
	body{
		color:#3d0505;
		background: #fff;
	}
</style>
<!-- content start -->
<div class="admin-content" style="margin-bottom: 48px;">
	<div class="am-tabs am-margin" style="margin-top:0; padding-top: 20px;">
	<div style="margin-bottom: 20px;">
		<span style="color: #3d0505;">
		感谢您对{:C('itk_site_name')}的关注，请留下对我们的建议、想法、问题等任何想对我们说的话，我们一直在为您改变！
		</span>
	</div>
		<div class="am-input-group am-input-group-secondary" style="margin-bottom: 10px;width: 100%;">
		<textarea id="content" style="height: 80px; border-color: #F54D23" maxlength="140" placeholder="对我们说点什么吧！" rows="4" type="text" class="am-form-field am-text-sm"></textarea>
		</div>
		<span class="am-btn am-btn-secondary am-btn-xs am-fr" id="submit">提交反馈</span>
		<span class="am-btn am-btn-default am-btn-xs am-fr" id="clear_content" style="margin-right: 5px; color: #8f8f8f">清空内容</span>
 		<div class="am-cf"></div>
		<div class="am-titlebar am-no-layout am-margin-vertical-sm" style="border-bottom: 0;height:30px;line-height:30px;">
			<h2 class="am-padding-left-sm" style="color:#3bb4f2;border-left: 3px solid #3bb4f2;"><font>我的反馈</font></h2>
		</div>
		<div class="am-collapse am-in" style="padding-top:0;padding-bottom:6px;">
            <ul class="am-list admin-content-task">
				<!-- volist 循环输出反馈内容 -->
				<notempty name="feeds">
	 			
	 			<volist name="feeds" id="vo">
	 			<li class="am-padding-vertical">
				    <div style="font-size: 1.2rem; color: #999;">{$vo.add_time|frienddate}</div>
				    <div class="am-text-sm am-margin-vertical-xs">{$vo.info}</div>
				  <!-- <div class="am-cf am-text-sm">
						<span class="am-badge am-badge-danger " style="margin-right:5px;">待回复</span>
						<span class="am-text-danger"></span>
					</div>-->
				</li>
				</volist>
				<else /> 
				暂无反馈意见!
				</notempty>
				<!-- volist 循环输出反馈内容 -->
            </ul>
            <ul class="am-pagination am-pagination-centered am-text-xs" id="page"></ul>
        </div>	
	</div>
</div>
	<style>
	.am-titlebar-default{
	color:#3bb4f2;
	}
</style>
<!-- content end -->
<include file="public/foot" />
</body> 
</html>